Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: add ETCS LOA logic to ETCS braking simulator #10316

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

Erashin
Copy link
Contributor

@Erashin Erashin commented Jan 10, 2025

LOA logic (see Subset given in code): compute indication curve from EBD.
To do so, couple of technicalities:

  • EBD foot is not (targetPos, targetSpeed). It is a point after targetPos, (targetPos + delta, targetSpeed) so that the EBD passes by the point (targetPos, targetSpeed + dvEbi).
  • The indication curve reaches the target speed before the LOA: create maintain target speed curve until target position.
  • We build the LOA braking curves along the path, so that, same as EOA, we handle overlaps of the braking curves. However, we must handle intersections differently, since here, the LOAs don't all have the same target speed. To do so, build the LOA braking curve into the envelope at each step, so that it is used as a ceiling for the following LOAs.
  • The indication curve positions can all be negative, if the LOA is close to the path start: handle the case so we still add a maintain speed from the start of the path until the LOA (second screenshot).

image

image

@github-actions github-actions bot added the area:core Work on Core Service label Jan 10, 2025
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch from b0ec3e8 to ba9f038 Compare January 10, 2025 10:24
@Erashin Erashin changed the base branch from dev to alch/core/etcs_use_physics_path January 10, 2025 10:25
@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.76%. Comparing base (ec18e08) to head (e93a30e).
Report is 6 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10316      +/-   ##
==========================================
- Coverage   81.78%   81.76%   -0.02%     
==========================================
  Files        1073     1073              
  Lines      106492   106492              
  Branches      727      727              
==========================================
- Hits        87095    87076      -19     
- Misses      19358    19377      +19     
  Partials       39       39              
Flag Coverage Δ
editoast 74.14% <ø> (-0.06%) ⬇️
front 89.36% <ø> (ø)
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Erashin Erashin force-pushed the alch/core/etcs_use_physics_path branch from cb6893a to bbbd885 Compare January 10, 2025 17:15
@Erashin Erashin linked an issue Jan 13, 2025 that may be closed by this pull request
@Erashin Erashin force-pushed the alch/core/etcs_use_physics_path branch from bbbd885 to 6d85230 Compare January 13, 2025 09:29
@Erashin Erashin force-pushed the alch/core/etcs_use_physics_path branch 9 times, most recently from 41c408e to dff72ae Compare January 15, 2025 08:29
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 2 times, most recently from 7e31c30 to bbbab6f Compare January 15, 2025 09:28
@Erashin Erashin force-pushed the alch/core/etcs_use_physics_path branch from dff72ae to 6fe9bff Compare January 15, 2025 09:34
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 2 times, most recently from f0eed6e to 556d53d Compare January 15, 2025 09:59
@Erashin Erashin force-pushed the alch/core/etcs_use_physics_path branch 2 times, most recently from 3adb1dc to 61f6cc8 Compare January 15, 2025 10:43
Base automatically changed from alch/core/etcs_use_physics_path to dev January 15, 2025 11:21
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 3 times, most recently from 1998907 to 9f86660 Compare January 16, 2025 09:55
@Erashin Erashin changed the title core: add etcs LOA and SVL logic core: add etcs LOA logic Jan 16, 2025
@Erashin Erashin changed the title core: add etcs LOA logic core: add ETCS LOA logic to ETCS braking simulator Jan 16, 2025
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 5 times, most recently from 5bfa910 to 8350dfe Compare January 16, 2025 11:18
@Erashin Erashin marked this pull request as ready for review January 16, 2025 11:21
@Erashin Erashin requested a review from a team as a code owner January 16, 2025 11:21
@Erashin Erashin requested review from eckter and bougue-pe January 16, 2025 11:21
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 2 times, most recently from 7a7883b to 655a2f2 Compare January 16, 2025 15:34
Copy link
Contributor

@eckter eckter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! I only have some minor comments.

I haven't double-checked the formulas as much as I'd have liked to, it's quite difficult to get familiar enough with the reference doc.

Do you think we could add some asserts here and there? It would be valuable in this context.

@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 2 times, most recently from 785ca9c to f95b0b1 Compare January 17, 2025 13:50
Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not review LoA precisely (will do even if merged, improving late is better than nothing on the matter).

It's OK to merge IMO as long as we can hand-test this, and as long as it doesn't break "normal" braking. So please do if I don't have the time to review LoA before the deadline 🙏

@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch 2 times, most recently from 2d5c58d to 5fd6dac Compare January 17, 2025 14:46
@Erashin Erashin force-pushed the alch/core/add_loa_svl_etcs_logic branch from 5fd6dac to e93a30e Compare January 17, 2025 14:46
@Erashin Erashin enabled auto-merge January 17, 2025 14:50
@Erashin Erashin added this pull request to the merge queue Jan 17, 2025
Merged via the queue into dev with commit 9de1a14 Jan 17, 2025
27 checks passed
@Erashin Erashin deleted the alch/core/add_loa_svl_etcs_logic branch January 17, 2025 15:46
Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, and the simplifications you did here and there are very welcome 🙏
We may dig a bit on mutualizing the code... Let's see how it goes with SvL!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core Work on Core Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core: ETCS: implement LOA braking curves logic
4 participants